package com.jpxx.jpscp.core.base.enitity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;
/**
 * @Description:
 * @author: Zhaopengfei
 * @copyright: 金鹏信息技术有限公司
 * @CreatedDate: 2018年03月14日 14:15
 * @Copyright: All rights Reserved，Designed By Jpsycn
 */

public class BaseEntity<T extends Model> extends Model<T>{
    private static final long serialVersionUID = 1L;
    @TableId(value="id")
    public String id;

    @TableField(exist = false)
    private Integer page = 1;

    @TableField(exist = false)
    private Integer rows = 10;

    @TableField(value="create_by",fill = FieldFill.INSERT)
    private String createBy;

    @TableField(value="create_date" ,fill = FieldFill.INSERT)
    private Date createDate;

    @TableField(value="create_name",fill = FieldFill.INSERT)
    private String createName;

    @TableField( value="update_by",fill = FieldFill.UPDATE)
    private String updateBy;

    @TableField( value="update_date",fill = FieldFill.UPDATE)
    private Date updateDate;

    @TableField(value="update_name",fill = FieldFill.UPDATE)
    private String updateName;
    //0可用 1删除
    @TableField( value="is_del",fill = FieldFill.INSERT)
    private Integer isDel;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getRows() {
        return rows;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateUserBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateUserId(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
